import createMesh from './js/mesh'
import createLight from './js/lights'
import postProcess from './js/postProcess'

export default function shaderGradient(options) {
  const { lightType, envPreset, brightness, grain/*, toggleAxis, ...others*/ } = options
  const mesh = createMesh(options)
  const light = createLight({lightType, brightness, envPreset})
  if(grain !== 'off') {
    setTimeout(()=>{
      postProcess();
    }, 1000)
  }
  return [mesh, light]
}
